home *** CD-ROM | disk | FTP | other *** search
/ CD Actual 90 / CD Actual 90.iso / Software3D / K-3D / k3d-0.4.2.1 / shaders / k3d_fill.sl < prev    next >
Encoding:
Text File  |  2004-07-23  |  331 b   |  15 lines

  1. /*IDfill written by Ivan DeWolf
  2.  *simple toon fill shader with shadows
  3.  *compare this to plastic.sl
  4.  */
  5. surface 
  6. k3d_fill( 
  7.     float    Kd            =   1, 
  8.         Ka            =  .7,
  9.         min            =   0.05,
  10.         max            =   0.055)
  11. {
  12.     normal Nf = faceforward(normalize(N), I );
  13.     Ci = Cs * (Ka*ambient() + Kd*(smoothstep(min,max,comp(diffuse(Nf),0))));
  14. }
  15.